package inheritance;

public class RaceCar extends Car {

	private boolean nitro;
	RaceCar(int year, String make, String model, boolean nitro){
		
		super(make,model,year); //this is how we initialize our make,model and year from the car class by calling super constructor.
		
		this.nitro=nitro; // this is how we initialize nitro feature in this subclass race car.
	}
	
	
	
	void race() {

		System.out.println("I am racing.");
		accelerate(getMaximumSpeed());

	}

}
